﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using www.serviciipeweb.ro.iafblog.ExportDLL;
namespace ExportDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            DataTable dta = new DataTable("andrei");
            dta.Columns.Add(new DataColumn("ID", typeof(int)));
            dta.Columns.Add(new DataColumn("Data", typeof(string)));
            dta.Rows.Add(1, "test 1 & <");
            dta.Rows.Add(2, "test 2 ");
            dta.Rows.Add(3, "test 3 >");

            dta.ExportTo(ExportToFormat.Excel2007, @"C:\andrei.xlsx");

            dta.ExportTo(ExportToFormat.Word2003XML, @"C:\andrei.doc");


            dta.ExportTo(ExportToFormat.Word2007, @"C:\andrei.docx");


            dta.ExportTo(ExportToFormat.itextSharpXML, @"C:\aitext.xml");

            dta.ExportTo(ExportToFormat.Excel2003XML, @"C:\andrei.xls");


            dta.ExportTo(ExportToFormat.HTML, @"C:\andrei.html");


            dta.ExportTo(ExportToFormat.XML, @"C:\andrei.xml");

            dta.ExportTo(ExportToFormat.PDFtextSharpXML, @"C:\andrei.pdf");

            System.Diagnostics.Process.Start("cmd.exe"," /K \"dir c:\\andrei.????\"");
            return;

        }
    }
}
